<!-- inc:global_head -->
<!-- inc:right.css -->
<!-- inc:right.head -->

<!-- 玩家管理 -->
<!-- if($sysAct == "add" || $sysAct == "modify") -->
<div class="table2" style="text-align:left;">
	<a href="admin.php?file=index">系统首页</a> &raquo;
	<a href="admin.php?file=userjs&act=list">玩家军队</a> &raquo;
	<!-- if($sysAct == "add") -->添加新军队<!-- else -->编辑军队<!-- end -->
	<input type="button" value="军队列表" onclick="qgurl('admin.php?file=userjs&act=list')">
</div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<form method="post" action="admin.php?file=userjs&act=viewok&id={:$id}" onsubmit="return add_msg();">
<tr>
	<td class="left">所在城池：<span style="color:red;">*</span></td>
	<td class="right">
		<input type="text" name="c_id" id="c_id" value="{:$rsa[c_name]}">
	</td>
</tr>
</table>
</div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<tr>
	<td class="left">所属玩家：<span style="color:red;">*</span></td>
	<td class="right">
		<input type="text" name="u_id" id="u_id" value="{:$rsb[p_nickname]}">
<span class="clue_on">[填写所属玩家的ID不是账号]</span>
	</td>
</tr>
</table>
</div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<tr>
	<td class="left">步  卒：</td>
	<td class="right">
		<input type="text" name="bu_zhu" id="bu_zhu" value="{:$rs[bu_zhu]}">
	</td>
</tr>
</table>
</div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<tr>
	<td class="left">探  子：</td>
	<td class="right">
		<input type="text" name="tan_zhi" id="tan_zhi" value="{:$rs[tan_zhi]}">
	</td>
</tr>
</table>
</div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<tr>
	<td class="left">辎 重 兵：</td>
	<td class="right">
		<input type="text" name="zz_bing" id="zz_bing" value="{:$rs[zz_bing]}">
	</td>
</tr>
</table>
</div>

<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<tr>
	<td class="left">扑 刀 手：</td>
	<td class="right">
		<input type="text" name="pd_shou" id="pd_shou" value="{:$rs[pd_shou]}" >
	</td>
</tr>
</table>
</div>
<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<tr>
	<td class="left">短 弓 手：</td>
	<td class="right">
		<input type="text" name="dg_shou" id="dg_shou" value="{:$rs[dg_shou]}" >
	</td>
</tr>
</table>
</div>
<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<tr>
	<td class="left">白 耳 士：</td>
	<td class="right">
		<input type="text" name="be_shi" id="be_shi" value="{:$rs[be_shi]}" >
	</td>
</tr>
</table>
</div>
<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<tr>
	<td class="left">白马义从：</td>
	<td class="right">
		<input type="text" name="bmy_chong" id="bmy_chong" value="{:$rs[bmy_chong]}" >
	</td>
</tr>
</table>
</div>
<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<tr>
	<td class="left">筑 城 队：</td>
	<td class="right">
		<input type="text" name="zc_dui" id="zc_dui" value="{:$rs[zc_dui]}" >
	</td>
</tr>
</table>
</div>
<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<tr>
	<td class="left">先登死士：</td>
	<td class="right">
		<input type="text" name="xds_shi" id="xds_shi" value="{:$rs[xds_shi]}" >
	</td>
</tr>
</table>
</div>
<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<tr>
	<td class="left">辎 重 车：</td>
	<td class="right">
		<input type="text" name="zz_che" id="zz_che" value="{:$rs[zz_che]}" >
	</td>
</tr>
</table>
</div>
<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<tr>
	<td class="left">陷 阵 营：</td>
	<td class="right">
		<input type="text" name="xz_ying" id="xz_ying" value="{:$rs[xz_ying]}" >
	</td>
</tr>
</table>
</div>
<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<tr>
	<td class="left">近卫甲兵：</td>
	<td class="right">
		<input type="text" name="jwj_bing" id="jwj_bing" value="{:$rs[jwj_bing]}" >
	</td>
</tr>
</table>
</div>
<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<tr>
	<td class="left">西凉铁骑：</td>
	<td class="right">
		<input type="text" name="xlt_qi" id="xlt_qi" value="{:$rs[xlt_qi]}" >
	</td>
</tr>
</table>
</div>
<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<tr>
	<td class="left">无当飞军：</td>
	<td class="right">
		<input type="text" name="wdf_jun" id="wdf_jun" value="{:$rs[wdf_jun]}" >
	</td>
</tr>
</table>
</div>
<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<tr>
	<td class="left">虎 豹 骑：</td>
	<td class="right">
		<input type="text" name="hb_qi" id="hb_qi" value="{:$rs[hb_qi]}" >
	</td>
</tr>
</table>
</div>
<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<tr>
	<td class="left">霹 雳 车：</td>
	<td class="right">
		<input type="text" name="pl_che" id="pl_che" value="{:$rs[pl_che]}" >
	</td>
</tr>
</table>
</div>
<div class="table" onmouseover="this.className='table table1'" onmouseout="this.className='table'">
<table width="100%">
<tr>
	<td class="left">弩 炮 车：</td>
	<td class="right">
		<input type="text" name="np_che" id="np_che" value="{:$rs[np_che]}" >
	</td>
</tr>
</table>
</div>

<!-- run:$button_msg = $sysAct == "modify" ? "编辑玩家" : "添加玩家";-->
<div class="table">
<table width="100%">
<tr>
	<td class="left"></td>
	<td class="right"><input type="submit" id="creat_button" class="mybutton_01" value="{:$button_msg}"> &nbsp; <span id="show_step" style="color:red;"></span></td>
</tr>
</form>
</table>
</div>
<script type="text/javascript">
function add_msg(msg)
{
	var username = $("username").value;
	if(!username)
	{
		alert("账号不允许为空");
		return false;
	}

	$("show_step").innerHTML = "<img src='images/loading.gif' border='0' align='absmiddle'> 正在保存数据，如果网页没有动静请刷新...";

	$("creat_button").disabled = true;
}
</script>

<!-- elseif($sysAct == "list") -->
<div class="table2" style="text-align:left;">
	<a href="admin.php?file=index">系统首页</a> &raquo;
	玩家军队
	<input type="button" value="添加新军队" onclick="qgurl('admin.php?file=userjs&act=add')">
</div>

<div class="table">
	<table cellpadding="1" cellspacing="0">
	<form method="post" action="admin.php?file=userjs&act=list">
	<tr>
		<td><input type="text" name="keywords" id="keywords" value="{:$keywords}"></td>
		<td>
			<select name="stype" id="stype">
			<option value="s_id"{if($stype == "s_id")} selected{end}>军队ID</option>
			<option value="c_id"{if($stype == "c_id")} selected{end}>所在城ID</option>
			<option value="u_id"{if($stype == "u_id")} selected{end}>所属君主ID</option>
			</select>
		</td>
		<td>
			<input type="submit" value="搜索" class="mybutton_01">
		</td>
		</form>
	</tr>
	</table>
</div>

<table width="100%" cellpadding="0" cellspacing="0">
<tr>
	<td style="border-bottom:1px #D4D4D4 solid;"><img src="images/blank.gif" border="0" width="1" height="1"></td>
</tr>
</table>

<table width="100%" cellpadding="0" cellspacing="0">
<tr class="table table2">
	<td height="23px" class="msg_subject_id b_b">军队编号</td>
	<td class="msg_subject b_b">所属君主</td>
	<td class="msg_subject b_b">所在城池</td>
	<td class="msg_subject b_b">军队总数</td>
	<td align="center" class="msg_subject b_b">操作</td>
</tr>
<!-- $rslist AS $key=>$value -->
<tr class="m_out" onmouseover="this.className='m_over'" onmouseout="this.className='m_out'">
	<td height="25px" align="center" class="b_b">{:$value[s_id]}</td>
	<td align="left" class="b_b">{:$value[u_id]}</td>
	<td align="left" class="b_b">{:$value[c_id]}</td>
	<td align="left" class="b_b">{run:$ta=$value[bu_zhu]+$value[tan_zhi]+$value[zz_bing]+$value[pd_shou]+$value[dg_shou]+$value[be_shi]+$value[bmy_chong]+$value[zc_dui]+$value[xds_shi]+$value[np_che]+$value[zz_che]+$value[xz_ying]+$value[jwj_bing]+$value[xlt_qi]+$value[wdf_jun]+$value[hb_qi]+$value[pl_che];echo $ta;}</td>
	<td align="center" class="b_b">
		<input type="button" value="编辑" class="mybutton_01" onclick="qg_modify({:$value[s_id]})">
		<input type="button" value="删除" class="mybutton_01" onclick="qg_delete({:$value[s_id]})">
	</td>
</tr>
<!-- end -->
</table>

<div align="right">{:$pagelist}</div>
<script type="text/javascript">
function qg_modify(id)
{
	window.location.href="admin.php?file=userjs&act=modify&id="+id;
}
function qg_delete(id)
{
	//判断是否删除
	question = confirm("确认删除该信息吗？特别说明，删除后无法恢复！");
	if (question != "0")
	{
		qgurl("admin.php?file=userjs&act=delete&id="+id);
	}
}
</script>
<!-- end -->